#pragma once

#include "CDependencyObject.h"

class CSolidColorBrush;


class CRenderTarget;
class HWFrameData;


class SolidColorBrushClone :
	public CDependencyObject
{
public: 
	static HRESULT CloneForTarget(CSolidColorBrush * pBrush, CRenderTarget * pRenderTarget, HWFrameData * pFrameData, SolidColorBrushClone * * ppBrushClone);
	static void NWSetContentDirty(CDependencyObject * pTarget, enum DirtyFlags::Value flags);
	virtual XUINT32 GetTypeIndex() const;
	HRESULT AddPrimitiveSlot(XUINT32 slot);
	void ApplyBrush();
	XBOOL IsBrushDirty();

protected: 
	SolidColorBrushClone(CCoreServices * pRenderCore, HWFrameData * pFrameData);
	virtual ~SolidColorBrushClone();
private: 
	HRESULT Initialize(CRenderTarget * pRenderTarget, CSolidColorBrush * pBrush);
public: 
	XUINT32 m_argb;
private: 
	XBOOL m_isColorDirty;
	HWFrameData * m_pFrameData;
	xvector<XUINT32> m_slots;
};
